Golang - 條件式與迴圈



if-else

if condition {
    ...
} else {
    ...
}

switch

switch condition {
case c1:
    ...
case c2:
    ...
default:
    ...
}

for

for i := 0; i < count; i++ {
    ...
}

while

for {
    ...
}
#golang #GO







你可能感興趣的文章

Ruby on Rails 第一步 學習筆記

Ruby on Rails 第一步 學習筆記

[ Vue3筆記 ] computed

[ Vue3筆記 ] computed

資結、 Complexity and Big O Notation

資結、 Complexity and Big O Notation






留言討論